package com.ss.android.article.base.feature.detail2.picgroup.a;

import android.content.Intent;
import android.net.Uri;
import android.view.View;

import com.bytedance.article.common.c.TTUtils;
import com.ss.android.article.base.feature.detail.model.ArticleInfo;
import com.ss.android.newmedia.activity.browser.BrowserActivity;

public final class c implements View.OnClickListener {
    private final b b;
    private final ArticleInfo a;

    public c(b arg1, ArticleInfo arg2) {
        this.b = arg1;
        this.a = arg2;

    }

    public final void onClick(View arg4) {
        if(this.a.mWebInfo != null) {
            if(TTUtils.isValidUrl(this.a.mWebInfo.webUrl)) {
                Intent v0 = new Intent(this.b.mActivity, BrowserActivity.class);
                v0.putExtra("title", this.a.mWebInfo.webTitle);
                v0.setData(Uri.parse(this.a.mWebInfo.webUrl));
                this.b.mActivity.startActivity(v0);
            }
            else {
                this.b.mActivity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(this.a.mWebInfo.webUrl)));
            }
        }
    }
}

